package com.bl.weilan.dao.model;

import com.bl.weilan.dao.model.converter.DatetimeConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import java.util.Date;
import javax.persistence.*;

/**
 * Created by liangweikang on 19/6/24.
 */
@Entity
@Data
@Table(name = "news")
@ApiModel(value = "NewsEntity", description = "新闻")
@DynamicInsert
@DynamicUpdate
public class NewsEntity {
    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "图片")
    private String image;

    @ApiModelProperty(value = "链接")
    private String url;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "权重")
    private int weight;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @Column(name = "update_time")
    private Date updateTime;


}
